import { createApp } from 'vue';
import Antd from 'ant-design-vue';
import * as Icons from '@ant-design/icons-vue';

import 'ant-design-vue/dist/reset.css';
import '@/styles/reset.less';
// 注入路由
import router from '@/router';
// 注入pinia仓库
import pinia from '@/store';

import App from './App.vue';

const app = createApp(App);

Object.keys(Icons).forEach(key => {
  app.component(key, (Icons as any)[key]);
});
app.config.globalProperties.$icons = Icons;

app.use(Antd);
app.use(router);
app.use(pinia);
app.mount('#app');
